package com.feri.api.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.feri.common.entity.Userlog;
import org.apache.ibatis.annotations.Select;

/**
 * .::::.
 * .::::::::.
 * :::::::::::  I && YOU
 * ..:::::::::::'
 * '::::::::::::'
 * .::::::::::
 * '::::::::::::::..
 * ..::::::::::::.
 * ``::::::::::::::::
 * ::::``:::::::::'        .:::.
 * ::::'   ':::::'       .::::::::.
 * .::::'      ::::     .:::::::'::::.
 * .:::'       :::::  .:::::::::' ':::::.
 * .::'        :::::.:::::::::'      ':::::.
 * .::'         ::::::::::::::'         ``::::.
 * ...:::           ::::::::::::'              ``::.
 * ````':.          ':::::::::'                  ::::..
 * '.:::::'                    ':'````..
 * ━━━━━━永无BUG!━━━━━━
 *
 * @Description:
 * @Author: 学习强国
 * @Date: 2022/10/02 13:26:55
 */
public interface UserlogDao extends BaseMapper<Userlog> {
    /**
     * 查询用户今日有没有登录日志
     */
    @Select("select * from c_userlog where uid=#{id} and type=2 and DATE_FORMAT(ctime,'%Y-%m-%d')=DATE_FORMAT(now(),'%Y-%m-%d') limit 1")
    Userlog selectLoginlog(long uid);
}
